<?php
require_once 'KLogger.php';
require_once 'model/BarangModel.php';
class Barang {
	public $dp;
	public $log;

	function __construct(){
		$this->log = new KLogger ("log.txt",KLogger::DEBUG);
	}

	function post($request_data=NULL) {
		//bikin object baru dari xml terus di masukin ke database;
		$model = new BarangModel($request_data);
		header('Connection',"close");
		header('Refresh: 5; url=http://localhost/mobi/items');
	}

	function get($id=null) {
		//ambil 1 record database barang berdasarkan $id;
		$model = new BarangModel();
		print_r('xml : '.$id);
	}

}
